/**
 * Created by no1 on 2014/9/27.
 */

module.exports = {
    /*
     * server configure
     */

//  bindingApiHost: 'api.mahoo.cn',
//  apiPort: 1888,

//  bindingWebHost: '', //www.mahoo.cn
//  webPort: 7001,
//
//  bindingManApiHost: 'admin.mahoo.cn',
//  manapiPort: 7002,

    // debug mode
    // if in debug mode, some middleware like limit wont load
    // logger module will print to stdout
    debug: true,

    /**
     * elastic search config
     */
    "elasticSearch": {
        "host": "192.168.61.10:9200",
        //"host": "127.0.0.1:9200",
        "index": "o2o"
    },

    /**
     * mysql config
     */

    mysqlServers: [
        {
            host: '192.168.61.10',
            //host: '127.0.0.1',
            port: 3306,
            user: 'csapp',
            password: 'j1C9k3Mn'
        }
    ],
    mysqlDatabase: 'mahoo',
    mysqlMaxConnections: 20,
    mysqlQueryTimeout: 5000,


    // redis config
    // use for koa-limit module as storage
    redis: {
        host: 'localhost',
        port: 6379,
        options: {
            //auth_pass: 'd53aOe1F9q'
        }
    },

    upyun: { //又拍云存储 开发环境
        activity_img_url: 'http://inmm-test.b0.upaiyun.com/img/activity/',//活动宣传图片url
        avatar_url: 'http://img-test.yueniapp.com/avatar',//自定义头像url
        default_avatar_url: 'http://img-test.yueniapp.com/avatar/default',//默认头像url
        tag_url: 'http://img-test.yueniapp.com/tag',//自定义标签url
        default_tag_url: 'http://img-test.yueniapp.com/tag/default',//默认标签url
        img_url: 'http://img-test.yueniapp.com/img',//帖子图url
        video_url: 'http://192.168.61.10/video',//视频url
        video_play_suffix: '!videoplay',//视频开始截图后缀
        video_screenshot_suffix: '!screenshot',//视频屏幕截图后缀
        bucket: 'inmm-test',
        api_secret: 'jhQHCb0DX8dY9gbCYHBpMbX3Z40=',
        upload_url: 'http://v0.api.upyun.com',
        tag_suffix_middle: '.jpg!jpg150',//滤镜
        tag_suffix_min: '.jpg!jpg75',//标签小图
        suffix: '!jpg600',//帖子图
        suffix_min: '!jpg75',//帖子小图
        avatar_suffix: '.jpg!jpg300x300',//用户头像图
        avatar_suffix_default: '.jpg!jpg75',//用户头像图
        slider_url: 'http://img-test.yueniapp.com/slider',//轮播图目录
        tagmark_url: 'http://img-test.yueniapp.com/tagmark',//标签贴图目录
        tagbanner_url: 'http://img-test.yueniapp.com/tagbanner',//标签通栏图目录
        splashscreen_url: 'http://img-test.yueniapp.com/splashscreen',//启动画面图片url
        h5pic_url: 'http://img-test.yueniapp.com/h5/h',//h5图片url
        purge_url: 'http://purge.upyun.com/purge/',//刷新又拍云图片调用地址
        user: 'inmm01',
        pass: 'dkj34hFgAa9',
        token: '01ad63ee1239ebb3e47e5024d63166d5' //用户密码的md5
    },

    // 高德参数配置
    amap: {
        api_ver: 3,
        api_key: '891276fb426e6b189d23c1376f05feca',
        poi_info_url: 'http://restapi.amap.com/v3/place/detail',
        poi_info_s: 'rsv3',
        referer: 'http://admin.yn.com/',
        poi_rest_convert_url: 'http://restapi.amap.com/v3/assistant/coordinate/convert',
        api_rest_key: 'c08b88a4d14140ee1ad21af757cf800b'
    },

    //h5 地址
    h5config: {
        hurl: 'http://192.168.61.10/h5/h-'
    },

    // mongodb 设置
    mongo: {
        uri: 'mongodb://192.168.61.10:27017/yueniapp',
        options: {
            db: {native_parser: true},
            auto_reconnect: 1,
            server: {poolSize: 4},
            user: 'yueniapp',
            pass: 'kjhDh38273erdfEd'
        }
    },

    // 瀑布.im 机器人配置
    pubuIM: {
        url: 'https://hooks.pubu.im/services/kzdd4x696pr60yb',
        displayUser: {
            name: "个人调试",
            avatarUrl: 'https://beta.pubu.im/img/services/custom.png'
        }
    }
};